package com.zwh.modules.hzlog.controller;

import com.zwh.common.persistence.Page;
import com.zwh.modules.hzlog.dao.HzLogDao;
import com.zwh.modules.hzlog.entity.HzLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author zwh
 * @Date 2019/12/18 19:29
 **/
@Controller
@RequestMapping("/a/test")
public class TestController {

    @Autowired
    private HzLogDao hzLogDao;

    @RequestMapping(value = "index")
    @ResponseBody
    public Page index(){
        HzLog hzLog=new HzLog();
        Page page = new Page(1,2);
        hzLog.setPage(page);
        page.setList(hzLogDao.findList(hzLog));
        return page;
    }
}
